* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background: #f8f8f8;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 顶部状态栏 */
.status-bar {
    height: 44px;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.user-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    overflow: hidden;
    margin-right: 8px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-size: 14px;
    font-weight: 500;
}

.game-stats {
    display: flex;
    align-items: center;
}

.coin {
    display: flex;
    align-items: center;
    background: #FFF9E6;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #FF9500;
}

.coin-icon {
    margin-right: 4px;
    font-size: 14px;
}

/* 游戏场景 */
.game-scene {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #FAF2E4;
}

.restaurant-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F5F5;
}

/* NPC角色 */
.npc {
    position: absolute;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.2s;
}

.npc:hover {
    transform: scale(1.1);
}

.npc-icon {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
}

.npc-name {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.npc-waiter {
    top: 30%;
    left: 25%;
}

.npc-chef {
    top: 20%;
    right: 25%;
}

.npc-customer {
    bottom: 30%;
    right: 30%;
}

/* 玩家角色 */
.player {
    position: absolute;
    bottom: 40%;
    left: 45%;
    width: 60px;
    height: 60px;
}

.player-icon {
    width: 100%;
    height: 100%;
    background: #E3F2FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border: 2px solid #2196F3;
}

/* 交互提示 */
.interaction-hint {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0.8;
    pointer-events: none;
}

/* 对话框 */
.dialog-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 100;
}

.dialog-container.active {
    transform: translateY(0);
}

.dialog-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.dialog-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.dialog-name {
    font-weight: bold;
    font-size: 16px;
}

.dialog-close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    cursor: pointer;
}

.dialog-content {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
}

.dialog-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialog-option {
    background: #007AFF;
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.dialog-option:hover {
    background: #0056b3;
}

/* 底部导航栏 */
.tab-bar {
    height: 50px;
    background: #ffffff;
    display: flex;
    border-top: 1px solid #e0e0e0;
    position: relative;
    z-index: 10;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    cursor: pointer;
}

.tab-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.tab-item.active {
    color: #007AFF;
}

/* 菜单面板 */
.menu-panel {
    position: absolute;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background: white;
    transition: right 0.3s ease;
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}

.menu-panel.active {
    right: 0;
}

.menu-header {
    padding: 15px;
    background: #FF9500;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-title {
    font-size: 18px;
    font-weight: bold;
}

.menu-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.menu-category {
    margin-bottom: 20px;
}

.category-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #FF9500;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.menu-item:hover {
    background: #f9f9f9;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.item-desc {
    font-size: 12px;
    color: #666;
}

.item-price {
    color: #FF9500;
    font-weight: bold;
}

/* 词汇收集系统 */
.vocabulary-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.vocabulary-icon {
    margin-right: 5px;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

/* 响应式调整 */
@media screen and (max-height: 600px) {
    .dialog-container {
        padding: 15px;
    }
    
    .dialog-content {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .dialog-option {
        padding: 8px 12px;
    }
}

/* 食谱收集系统 */
.recipe-collected {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 300;
    display: none;
}

.recipe-collected.active {
    display: block;
    animation: fadeIn 0.5s;
}

.recipe-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.recipe-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FF9500;
}

.recipe-desc {
    font-size: 14px;
    margin-bottom: 15px;
}

.recipe-button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}